<?php
function setError($errorTitle,$errorMess){
	$_SESSION['errorStatus'] = 1;
	$_SESSION['errorTitle'] = $errorTitle;
	$_SESSION['errorMess'] = $errorMess;	
}
function errorCheck(){
	$errorStatus = $_SESSION['errorStatus'];
	if(isset($errorStatus)){
		echo "<div id=\"errorPane\"><label class=\"title\">Error:".$_SESSION['errorTitle']."</label><br />";
		echo $_SESSION['errorMess'];
		echo "</div>";
	}	
	unset($_SESSION['errorStatus']);
	unset($_SESSION['errorTitle']);
	unset($_SESSION['errorMess']);
}

function proressBar($var){
	$comp = $var;
	$left = 100 - $var;
	if($var<100){
		echo "<TABLE border=0 cellspacing=0 cellpadding=0><TR style=\"width:200px;\"><TD style=\"width:".$comp.
		"%;background-color:green;height:10px;\"></TD><TD style=\"width:".$left.
		"%;background-color:red;height:10px;\"></TD></TR></table>";
	}else{
		echo "<TABLE border=0 cellspacing=0 cellpadding=0><TR style=\"width:200px;\">".
		"<TD style=\"width100%;background-color:green;height:10px;\"></TR></table>";

	}
}
?>